import CheckRecordApi from '../../api/checkRecord'
Page({

  data: {
    checkRecords:[],
    showCheckResult: false,
    checkRecord:{},
  },

  onLoad(options) {
    wx.showLoading({
      title: '加载中...',
    })
    let that = this
    CheckRecordApi.queryCheckRecords().then(res => {
      if (res.data.code === 200) {
        that.setData({
          checkRecords: res.data.data.records
        })
      } else {
        wx.hideLoading()
        wx.showToast({
          title: res.data.data,
          icon: 'none'
        })
      }
      console.log(res);
    })
    wx.hideLoading()
  },
  showRemark({currentTarget:{dataset:{item}}}) {
    console.log(item);
    this.setData({
      showCheckResult: true,
      checkRecord: item
    })

  },

})